#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>

using namespace std;

int main()
{
    int cnt = 0;
    void *p;
    while (p = malloc(1024 * 1024 * 1024))
    {
        cnt++;
    }
    cout << cnt << endl;
	return 0;
}
